package com.lhj.bootdemo.designmode.prototype;

/**
 * @author lhj
 * @version 1.0
 * @date 2022/5/13 2:22 下午
 * @description: 测试程序
 */

public class PrototypePatternDemo {

    public static void main(String[] args) {


        ShapeCache.loadCache();
        Shape shape1 = ShapeCache.getShape("1");

        Shape clone = (Shape) shape1.clone();
        System.out.println("shape1:" + clone.getType());

        Shape shape2 = ShapeCache.getShape("2");
        System.out.println("shape2:" + shape2.getType());

    }
}
